﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YYSite.Application.IdentityUsers;
using YYSite.Common;
using YYSite.Common.Domain;
using YYSite.Common.Logging;
using YYSite.Domain.System.IdentityUsers;

namespace YYSite.Application.System.IdentityUsers
{
    public class IdentityUserService : ApplicationService,IIdentityUserService
    {
        public IdentityUserService(ILogger logger,IIdentityUserRepository identityUserRepository):base(logger)
        {
            IdentityUserRepository = identityUserRepository;
        }

        protected IIdentityUserRepository IdentityUserRepository { get; }

        public void CreateIdentityUser(IdentityUserCreateModel model)
        {
            this.IdentityUserRepository.Create(AutoMapper.Mapper.Map<IdentityUser>(model));
        }
        public DataGridOutput<IdentityUser> GetIdentityUserByPage(GetIdentityUserDataGridInput input)
        {
            return this.IdentityUserRepository.GetIdentityUserByPage(input);
        }
    }
}


